<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<html lang="en">
<head>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>班级列表</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/statics/css/bootstrap.min.css">
    <script type="text/javascript" src="${pageContext.request.contextPath}/statics/js/jquery-1.8.3.min.js"></script>
</head>
<body>
<div class="container-fluid">
    <div class="row">
        <div class="col-sm-12" style="margin:20px 0px; ">
            <input type="button" value="添加班级" class="btn btn-sm btn-info"
                   onclick="location.href='${pageContext.request.contextPath}/clazz/showMark?mark.mtype=班级'"/>
        </div>
        <div class="col-sm-12">
            <div class="row">

                <%--班级展示页面--%>
                <c:forEach var="c" items="${requestScope.clazzes}">
                    <div class="col-sm-2">
                        <div class="thumbnail">
                            <img style="width: 520px;height: 180px;" src="${pageContext.request.contextPath}/upload${c.cLogoPath}">
                            <div class="caption">
                                <h4>${c.cname}</h4>
                                <p><span class="label label-info">${c.mark.mname}</span></p>
                                <p><a href="${pageContext.request.contextPath}/clazz/dropClazz?clazz.clazzId=${c.clazzId}" class="btn btn-danger btn-sm btn-block" role="button" >删除班级</a>
                            </div>
                        </div>
                    </div>
                </c:forEach>

            </div>
        </div>
    </div>
</div>


</body>

</html>